package cn.imvc.app.models;

import java.util.Collection;
import java.util.LinkedHashMap;
import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.security.access.ConfigAttribute;
import org.springframework.security.web.util.matcher.RequestMatcher;

import cn.imvc.app.entities.Goods;
import cn.imvc.app.entities.GoodsSku;
import cn.imvc.app.entities.InventoryFlow;
import cn.imvc.data.domain.ViewRequest;

public interface GoodsSkuModel {
LinkedHashMap<RequestMatcher, Collection<ConfigAttribute>> getRequestMap();
	
	Page<GoodsSku> find(ViewRequest viewRequest);
	
	GoodsSku get(int id);

	GoodsSku save(GoodsSku goodsSku);
	
	GoodsSku update(GoodsSku goodsSku);

	String delete(int id);

	String deleteBatch(int[] ids);
	
	List<GoodsSku> findByGoods(Goods goods);
	
	void deleteByGoods(Goods goods);
	
	void updateInventory(InventoryFlow inventoryFlow);
	
	int getSkuBySpec(String specId,int goodsid);
	
	int getSkuBySpecNoMothBall(String specId,int goodsid);
	
	void updateMothballAll(int goodsId);
	
	void updateSkuState(Goods goods);
}
